Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid invalid ovn-nbctl daemon socket path #1799

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

zhangzujian
Copy link
Member

What type of this PR

  • Bug fixes

In some scenarios, the environment variable OVN_NB_DAEMON contains output of command ovn-nbctl show:

E0811 14:09:33.118843 7 ovn-nbctl-legacy.go:1776] failed to access ovn-nb from daemon, "2022-08-11T06:09:33Z|00001|socket_util_unix|WARN|Unix socket name /var/run/ovn/ovn
-nbctl.17.ctl\nswitch ff84faad-84c6-4482-9848-d5418934deda (ovn-default)\n    port devops-api-cfbcdd76b-ndf2b.cpaas-system\n        addresses: [\"00:00:00:61:A5:AD 10.200.0.112
\"]\n    port devops-controller-757f46b86d-dzgbr.cpaas-system\n        addresses: [\"00:00:00:EB:4D:66 10.200.0.46\"]...: could not connect to ovn-nbctl daemon (File name too long); unset OVN_NB_DAEMON to avoid using daemon\n", "exit status 1"
W0811 14:09:33.119636 7 controller.go:73] ovn-nbctl daemon doesn't return, start a new daemon
...
E0811 16:14:24.525177       7 external_vpc.go:19] list lr failed2022-08-11T08:14:24Z|00001|socket_util_unix|WARN|Unix socket name /var/run/ovn/ovn-nbctl.30856.ctl
switch ff84faad-84c6-4482-9848-d5418934deda (ovn-default)
    port icarus-6457b7b867-wltzk.cpaas-system
        addresses: ["00:00:00:C4:CF:12 10.200.0.51"]
    port catalog-operator-7d97f8f9f8-t9zrl.cpaas-system
        addresses: ["00:00:00:68:F9:4A 10.200.0.134"]
    port devops-controller-757f46b86d-dzgbr.cpaas-system
...
    port razor-6f78bbf7dc-m4mq8.cpaas-system
        addresses: ["00:00:00:33:17:91 10.200.0. is longer than maximum 107 bytes

This patch adds a path check before setting the environment variable.

@zhangzujian zhangzujian added bug Something isn't working need backport labels Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need backport
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants